﻿using System;
using System.Collections.Generic;
using Color = System.Drawing.Color;
using SwinGame;

namespace Gundam_2._0_Alpha.src
{
    public abstract class BuffAction:CharacterAction
    {
        protected bool isBuff;
        protected Timer timer = Core.CreateTimer();
        protected int duration;
        private string name;

        public string Name
        {
            get { return name; }
        }

        public BuffAction(Character c, bool persistant, int row, int colEnd, int count, int lockoutLevel, string name, int duration, bool isBuff)
            : base(c, persistant, row, colEnd, count, lockoutLevel)
        {
            this.name = name;
            this.c = c;
            this.isBuff = isBuff;
            this.duration = duration;
        }

        public void DrawBuffDetails(float xLoc, float yLoc)
        {
            if (isBuff)
            {
                Text.DrawText(name, Color.Lime, xLoc, yLoc);
                Text.DrawText(duration - (int)Core.TimerTicks(timer) +"ms", Color.Lime, xLoc, yLoc+15);
            }
            else
            {
                Text.DrawText(name, Color.MediumVioletRed, xLoc, yLoc);
                Text.DrawText(duration - (int)Core.TimerTicks(timer) + "ms", Color.MediumVioletRed, xLoc, yLoc + 15);
            }
        }

    }
}
